package com.service.impl;

import com.dao.OrderDao;
import com.scheduler.QuartzJob;
import com.service.OrderService;
import org.quartz.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.Date;

@Service("orderService")
public class OrderServiceImpl implements OrderService, Serializable {
    @Autowired
    private OrderDao orderDao;

    @Scheduled(cron = "0 0/1 * * * ?")
    @Override
    public int updateDate(Date endDate) {
        return orderDao.updateByDate(endDate);
    }
}
